import time

from selenium import webdriver


def test_scroll_to():
    chromeOptions = webdriver.ChromeOptions()
    chromeOptions.add_argument('--start-maximized')
    driver = webdriver.Chrome(chromeOptions)

    driver.get('https://www.jd.com/')
    n=1
    while True:
        # driver.execute_script(f"document.body.scrollTop = {100*n};")
        driver.execute_script(f"window.scrollTo({(n-1)*50}, {n*50})")
        n+=1




